<extend name="Include:Layout"/>
<block name="title">阳光灿烂</block>
<block name="style">
<style>
#lesson_popup header h1{
    font-size: 18px;
    line-height:40px;
    color: #3cc51f;
    font-weight: 400;
    float:left;
    padding-left:15px;
  }
#lesson_popup td{border:solid #ddd; border-width:0px 1px 1px 0px;text-align:center;font-size:14px;line-height:30px;}
#lesson_popup table{border:solid #ddd; border-width:1px 0px 0px 1px;}
#lesson_popup td b{font-size:16px;padding-left:15px;}
  .choice {background-color:#EFEFF4;color:#04BE02;}
  .classlesson td {height:45px;}
 .text-info {color:#999;text-align:center;padding-top:10px;padding-bottom:10px;}
 .enable {color:#999;}
.weui_cells {font-size:14px;}
</style>
</block>

<block name="main">
<div class="weui_tab">
  <div class="weui_navbar">
  	  <div class="weui_navbar_item weui_bar_item_on">课程续费</div>
  </div>
  <div class="weui_tab_bd">
    <div class="weui_tab_bd_item weui_tab_bd_item_active">
    	<div class="weui_cells weui_cells_form">
    	 <div class="weui_cell">
		    <div class="weui_cell_hd"><label for="" class="weui_label">学生姓名</label></div>
		    <div class="weui_cell_bd weui_cell_primary">
		      <input class="weui_input" type="text" name="student" value="" placeholder="学生姓名">
		    </div>
		  </div>
		  <div class="weui_cell">
		    <div class="weui_cell_hd"><label class="weui_label">手机号码</label></div>
		    <div class="weui_cell_bd weui_cell_primary">
		      <input class="weui_input" type="tel" name="mobile" value="" placeholder="手机号码">
		    </div>
		  </div>
		</div>
		
		<div style="padding:15px;">
			<input type="hidden" name="t" value="laosheng"/>
			<button class="weui_btn weui_btn_primary btncheckorder">确定</button>
		</div>
    </div>
  </div>
</div>
</block>

<block name="script">
<script>
$(".btncheckorder").click(function(){
	var thisBtn = $(this);
	if(thisBtn.attr('disabled') == 'disabled') {
        return;
	}
	var student=$("input[name=student]").val();
	if(student == ''){
		$.alert("学生姓名不能为空",'');
		return false;
	}
	var mobile=$("input[name=mobile]").val();
	if(mobile == ''){
		$.alert("手机号码不能为空",'');
		return false;
	}
	var data = {
		tel:mobile,
		student:student
	}
	$.showLoading();
	$.post('/api/ygcl/checklaosheng',data,function(data){
		$.hideLoading();
		thisBtn.removeAttr('disabled');
		if(data.status){
			var d = data.data;
			
			location.href="/home/baoming/index/t/laosheng/type/"+d.type+"/id/"+d.id+".html";
		}else{
			$.alert("您输入的老生信息未通过",'');
		}
	});
	
})
</script>
</block>